<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    // js代码执行时 变量有位置提升的过程
    var age;
    console.log(age)  //undefined  变量定义 但是没有初始值
    age = 10
    console.log(age)

    function fn() {
        var name
        console.log(name)
        name = 'lisi'
        console.log(name)
    }

    fn();


</script>
</body>
</html>